package com.atzhiguo.springcloud.service.impl;

import com.atzhiguo.springcloud.dao.PaymentDao;
import com.atzhiguo.springcloud.entities.Payment;
import com.atzhiguo.springcloud.service.PaymentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zhiguo
 * @version v1.0
 * @create 2020/10/13 16:37
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    private static final Logger logger = LoggerFactory.getLogger(PaymentServiceImpl.class);

    @Resource
    private PaymentDao paymentDao;

    @Override
    public int create(Payment payment) {
        int i = paymentDao.create(payment);
        return i;
    }

    @Override
    public Payment getPaymentById(long id) {
        Payment payment = paymentDao.getPaymentById(id);
        return payment;
    }

}
